home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / disk / read403.zip / READ.DOC < prev    next >
Text File  |  1994-01-26  |  12KB  |  289 lines

  1. READ.DOC
  2. 01/26/94
  3.  
  4. Program written by:
  5.                         Bruce Guthrie
  6.                         Room H-4885
  7.                         U.S. Dept of Commerce/ESA/OBA/BSISD
  8.                         Washington, D.C. 20230
  9.  
  10.                         (202) 482-3234
  11.  
  12. You may freely copy and re-distribute this program; however, the U.S.
  13. Department of Commerce neither guarantees nor assures compatibility of the
  14. program with all computer software or hardware.
  15.  
  16. Foreign users:  Please provide an Internet address in all correspondence or
  17. and just e-mail your problems to me at bgu@cu.nih.gov
  18.  
  19.  
  20. READ allows you to view any ASCII text document with 16,000 lines or less (about
  21. 900,000 bytes).  You can also search for text within a document, scroll around
  22. in the document, and split up big files into small files for printing or copying
  23. to another file.
  24.  
  25. READ supports a mouse scroll bar at the top if a compatible mouse is detected.
  26.  
  27. READ handles DOS text files (lines end with CR/LF), Mac text files (lines end
  28. with CR), or Unix text files (lines end with LF).
  29.  
  30.  
  31. Syntax:
  32.  
  33.     READ [ filespec | @flistfile ] [ /TITLE="title" ] [ /DATE=NONE ]
  34.       [ /line ] [ /Pport ] [ /-I ] [ /DOS | /-DOS ]
  35.       [ /MONO | /-MONO | /COLOR | /-COLOR ] [ /-MOUSE ] [ /? ]
  36.  
  37. where:
  38.  
  39. "filespec" is the file specification you want to view.  You can use a path
  40. specification and a single wildcard if you'd like.  It defaults to three
  41. wildcard selections; *.DOC, *.TXT, and *.BAT.  If more than one document in the
  42. directory matches the wildcard, you can switch back and forth between documents
  43. with Ctrl-PgUp and Ctrl-PgDn.
  44.  
  45. "@flistfile" is a text file that contains the names of any files you want READ
  46. to process.  The text file should contain one filename, with path if desired,
  47. per line.  You can include an optional title after any of the file name
  48. references (see /TITLE="title" option).
  49.  
  50. "/TITLE="title" " lets you specify an optional descriptive title to appear at
  51. the bottom of the screen instead of the file name.  The title can be up to 29
  52. characters in length unless /PAGE=NONE is specified in which case it can be up
  53. to 44 characters in length.  Multi-word titles should appear in quotation marks.
  54.  
  55. "/DATE=NONE" says to leave off the date-time stamp for the file on the status
  56. line.  This allows a user-defined title to be up to 44 characters in length.
  57.  
  58.  
  59. "/line" puts line "line" at the top of the screen.  Only applicable if
  60. "filespec" (vs "@flistfile") is used.
  61.  
  62. "/Pport" specifies the printer port to use for printing.  This typically
  63. defaults to /PLPT1:  although this can be overridden by the READ.INI file.  (See
  64. below.) If a READ.INI file is found, any /Pport, /MONO, /COLOR, /-MONO, or
  65. /-COLOR specification is ignored.
  66.  
  67. "/-I" says to ignore any READ.INI file found.
  68.  
  69. "/DOS" allows access to the jump to DOS feature of the program.  This is
  70. typically the default.
  71.  
  72. "/-DOS" prohibits jumping to DOS.
  73.  
  74. "/MONO" or "/-COLOR" forces the system into monochrome mode.
  75.  
  76. "/-MONO" or "/COLOR" forces the system into color mode.  This is typically the
  77. default.
  78.  
  79. "/-MOUSE" says to present the non-mouse menu bar even if a mouse is present.
  80.  
  81. "/?" or "/HELP" or "HELP" gives you the syntax of the command.  All current
  82. defaults that can overwritten by using the CONFIGWS.EXE routine are also shown.
  83.  
  84.  
  85. Return codes:
  86.  
  87. READ returns the following ERRORLEVEL codes:
  88.         0 = no problems
  89.       254 = input file(s) not found
  90.       255 = syntax problems, or /? requested
  91.  
  92.  
  93. Viewing options:
  94.  
  95. While you're viewing a document with the READ command, you can use the following
  96. keys:
  97.  
  98. Cursor movement keys (up/down):
  99.  
  100. Up                moves up one line
  101. Down              moves down one line
  102. Home              moves to the top line of the document
  103. End               moves to the bottom line of the document
  104. PgUp              moves up one screen's worth
  105. PgDn              moves down one screen's worth
  106. #line or Gline    moves to the given line in the document (goto line)
  107. +line             moves forward a number of lines
  108. -line             moves backward a number of lines
  109.  
  110. Cursor movement keys (right/left):
  111.  
  112. Right             moves one column to the right
  113. Left              moves one column to the left
  114. Tab               moves 8 columns to the right
  115. Shift-Tab         moves 8 columns to the left
  116. Ctrl-Right        moves to the far right of the document
  117. Ctrl-Left         moves to the far left of the document
  118.  
  119.  
  120. Search for text:
  121.  
  122. \ or F or f       search for text within the document
  123.                   (the search is case-insensitive; "/COMMERCE" will find
  124.                   "Commerce", "commerce", and "COMMERCE")
  125. /                 search for exact (case-sensitive) text within the document
  126. F3                search for the next occurrence of that text
  127. F9                search for the previous occurrence of that text
  128.  
  129. Marking lines:
  130.  
  131. Alt-M             mark top line for copy or print
  132. Alt-B             mark bottom line for copy or print
  133. Alt-U             unmark all lines
  134.  
  135. Copying/printing lines (can copy/print either marked lines, all lines, or just
  136. the lines that are currently on the screen):
  137.  
  138. Alt-C or Alt-D    copy (duplicate) lines to a file
  139. Alt-P             print lines
  140.  
  141. Next/previous documents:
  142.  
  143. Ctrl-PgUp         go to the previous file viewed
  144. Ctrl-PgDn         go to the next file specified on the input line
  145.  
  146. Miscellaneous:
  147.  
  148. Alt-E             toggles between 25-line and 43-/50-line mode (if your system
  149.                   supports EGA and VGA respectively)
  150. Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  151.                   this feature can be turned off using the /-DOS switch
  152. Alt-R             shows ruler at the top of the listing
  153. Ctrl-P or Ctrl-F  do a form feed to the printer
  154. F1                get help screen (which also includes some other statistical
  155.                   information like the size of the file in bytes)
  156. Esc               leave READ program
  157.  
  158. Note that you can't view beyond the beginning or end of the document.  This is
  159. obvious but you cannot scroll to the right if you're already seeing the far
  160. right of the display.
  161.  
  162.  
  163.  
  164. Marking and copying text:
  165.  
  166. If you need to copy a portion of your file to the printer or to another text
  167. file, you will typically want to mark sections of the text first.  This is done
  168. using the mark functions:  Alt-M marks the top line on the screen and Alt-B
  169. marks the bottom line on the screen.
  170.  
  171. For example, you might decide that you have a 2,000-line document and you want
  172. to print 50 lines of it.  Go to the first line you want to print or copy (you
  173. can use the search options if you want to).  Get that line at either the top of
  174. the screen or the bottom of the screen.  If it's the bottom line, press Alt-B;
  175. if it's the top line, press Alt-M.
  176.  
  177. Now go to the last line you want to print or copy.  Again, get that line at
  178. either the top of the screen or the bottom of the screen and press Alt-B or
  179. Alt-M appropriately.  Having marked two lines, the program tags those lines and
  180. all those lines between them.  You can use the F1 (help) key; it will tell you
  181. the first and last lines that are marked.
  182.  
  183. Now press Alt-C (or Alt-D) to Copy the lines elsewhere or Alt-P to print them.
  184. When you select these functions, you'll be asked if you want to process the
  185. whole file, just those lines on the current screen, or the lines that are
  186. marked.  Ask for the marked lines.  If you selected Alt-C, you'll be asked for
  187. the file name to copy the lines to.  If the file already exists, you'll be
  188. allowed to overwrite the existing file or append to it.
  189.  
  190. Note that you can say "LPT1:" or "PRN:" when you're doing Alt-C in which case
  191. the text will go to the printer.  The differences between Alt-C and Alt-P are:
  192.  
  193. (1) Alt-P will remove linefeeds during printing whereas Alt-C leaves them in.
  194.     Typically, Alt-C will result in double-spaced printing.
  195.  
  196. (2) Alt-P may reset the printer based on the width of the current document if a
  197.     READ.INI file is used.
  198.  
  199.  
  200. The READ.INI file:
  201.  
  202. The READ program utilizes a READ.INI file if one is found.  This file is an
  203. ASCII text file that can be created maintained by hand or else by Wayne
  204. Software's READINIT.EXE program (which is also free).  The file itself consists
  205. of one or more of the following types of statements:
  206.  
  207.         comments
  208.         PORT=port
  209.         PTYPE=name
  210.         INITT=string
  211.         INITW=string
  212.         AFTERP=string
  213.         AFTERF=string
  214.         COLOR=nnn nnn nnn nnn
  215.  
  216. comments are blank lines or any line beginning with:
  217.                         ;    (semi-colon)
  218.                         :    (colon)
  219.                         '    (quote)
  220.                         /*   (slash asterisk)
  221.  
  222. PORT=port provides the name of printer port such as LPT1:  or COM2:, you can
  223. specify a file name here if desired.  Defaults to "PORT=LPT1:".
  224.  
  225. PTYPE=name is the abbreviated name of printer brand such as "HPLJ" or "EPSON".
  226. This statement is purely informational to READ although it used by the
  227. READINIT.EXE program.
  228.  
  229. INITT=string ("initialize thin") provides the string that will be sent to the
  230. printer before printing if all lines in the document are 80 characters or less
  231. in length.  The string can include regular characters.  Special characters are
  232. entered by using their three-character ASCII numeric code preceded by a slash.
  233. "/027" is the code for the special character Escape.  You can specify
  234. INITT=(NONE) if desired.  Defaults to "INITT=(NONE)".
  235.  
  236. INITW=string ("initialize wide") provides the string that will be sent to the
  237. printer before printing if any lines in the document (not just the section
  238. printed) exceed 80 characters in length.  See INITT=string description.
  239. Defaults to "INITW=(NONE)".
  240.  
  241. For a Hewlett-Packard LaserJet, the following codes would typically be used:
  242.         INITT=/027E             (portrait mode, 80 column)
  243.         INITW=/027E/027(s16.66H (portrait mode, 132 column)
  244.  
  245. AFTERP=string specifies the string to print after a partial document is printed.
  246. This string can include a page eject character ("/012") or any printer reset
  247. codes ("/012/027E") you want.  Defaults to "AFTERP=(NONE)".
  248.  
  249. AFTERF=string specifies the string to print after a full document is printed.
  250. See AFTERP=string description.  Defaults to "AFTERF=(NONE)".
  251.  
  252.  
  253. COLOR=nnn nnn nnn nnn specifies the color settings to use for (in order) regular
  254. text, the status line, marked text, and found text.  Each setting must consist
  255. of three digits, the first two being the foreground color and the last being the
  256. background color.  The foreground color should be padded on the left with a 0 if
  257. it is only one digit in length.  Defaults to "COLOR=150 151 157 143".
  258.  
  259. Foreground colors:
  260.  
  261.         Low intensity           High intensity
  262.  
  263.         0 = black                8 = dark grey
  264.         1 = blue                 9 = light blue
  265.         2 = green               10 = light green
  266.         3 = cyan                11 = light cyan
  267.         4 = red                 12 = light red
  268.         5 = magenta             13 = light magenta
  269.         6 = brown               14 = light yellow
  270.         7 = white               15 = bright white
  271.  
  272. Adding 16 to any color will make the text blink.  Background colors can consist
  273. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  274.  
  275. The READ.INI file can skip any of the above statements in which case system
  276. defaults will be taken.
  277.  
  278. READ and READMAKE-created files look for READ.INI in the following locations in
  279. the following order:
  280.  
  281.         C:\
  282.         your default subdirectory
  283.         the directory where READ.EXE or the self-viewable file was found
  284.  
  285. Passing in "/-I" causes the READ.INI file to be ignored.  Note that a READ.INI
  286. file with PORT and COLOR settings causes any passed in "/MONO", "/COLOR",
  287. "/-MONO", "/-COLOR", or "/Pport" parameters to be ignored.
  288.  
  289.